import initialState from './initialState';
import { reducer as counterPlusOneReducer } from './counterPlusOne';

const reducers = [
  counterPlusOneReducer
]

export default (state = initialState, action: any) => {
  let newState;
  switch(action.type) {
    // Handel cross-topic actions here
    default:
      newState = state;
      break;
  }

  return reducers.reduce((s, r) => r(s, action), newState);
}